using System;
using System.Collections.Generic;
using System.Text;
using Barrage.Global;
using System.Xml;
using SlimDX;

namespace Barrage.GUI.Elements
{
    /// <summary>
    /// A GUIElement which displays the mouse cursor over the screen
    /// </summary>
    public class GUICursor : GUIElement
    {

        /// <summary>
        /// Item constructor
        /// </summary>
        /// <param name="layout">Layout that will hold this item</param>
        /// <param name="template">Template that will be used to render this item</param>
        /// <param name="xn">Xml Node that holds attribute values of this item</param>
        public GUICursor(GUILayout layout, string template, XmlNode xn)
            : base(layout, template, xn)
        {

        }

        /// <summary>
        /// \internal Updates item translation
        /// </summary>
        protected override void DoUpdate()
        {
            this.motion.Translation = new Vector3(Mouse.Instance.Position,0);
            base.DoUpdate();
        }
    }
}
